import request from '../../utils/request'
import store from '../../store'
// 创建直播表格数据
// 账户登录锁定解除
export function lockRelease(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/user/accountLockoutRelease/' + postselectinfo.username,
    method: 'post',
    data: postselectinfo
  })
}
// 用户个人信息
export function userInfo(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/user/getUserInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 用户个人信息修改
export function userInfoChange(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/user/changeUserInfo/' + postselectinfo.userid,
    method: 'post',
    data: postselectinfo
  })
}
// 平台登录日志信息
export function logonLogInformation(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/log/SysLogonLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台操作日志信息
export function operationInformation(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/log/SysOptLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台异常日志信息
export function abnormalInformation(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/log/SysExceptionLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台短信发送日志信息
export function smsMessage(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/log/SysSmsLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台邮件发送日志信息
export function mailMessage(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysEmailLogInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 插入
export function addressBookInformationCr(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo',
    method: 'post',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 条件更新
export function addressBookInformationTjgx(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo',
    method: 'put',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 件数
export function addressBookInformationNum(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/count',
    method: 'post',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 强制删除
export function addressBookInformationRemove(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/force',
    method: 'delete',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 强制删除(all)
export function addressBookInformationRemoveAll(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/force/batch',
    method: 'delete',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 检索
export function addressBookInformationSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/select',
    method: 'post',
    data: postselectinfo
  })
}
// 平台通讯录信息 - 更新
export function addressBookInformationGx(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysMailListInfo/' + postselectinfo.id,
    method: 'put',
    data: postselectinfo.formData
  })
}
// 平台定时任务管理 - 查询任务
export function timingTask(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/queryAllJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 新增任务
export function addTask(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/addJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 修改任务
export function modificationTask(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/updateJob',
    method: 'put',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 单条任务查询
export function singleStrip(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/queryOneJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 删除
export function deleteJob(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/deleteJob',
    method: 'delete',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 恢复
export function resumeJob(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/resumeJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 暂停
export function pauseJob(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/pauseJob',
    method: 'post',
    data: postselectinfo
  })
}
// 平台定时任务管理 - 立即执行
export function runJobNow(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/common/SysQuartzJob/runJobNow',
    method: 'post',
    data: postselectinfo
  })
}
// 码表
export function politicsGetCodeList(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: process.env.PREFIX + '/SysCodeInfo/select',
    method: 'POST',
    data: postselectinfo
  })
}
